
/**
 * 返回 10进制 Number 的长度
 */
unsigned char Number_Len(unsigned long int Number) {
    unsigned char len = 1;
    while (Number /= 10) len++;
    return len;
}

/**
 * 返回 16进制 Number 的长度
 */
unsigned char Number_Len_Hex(unsigned long int hexNumber) {
    unsigned char len = 1;
    while (hexNumber >>= 4) len++;
    return len;
}

/**
 * 返回 2进制 Number 的长度
 */
unsigned char Number_Len_Binary(unsigned long int hexNumber) {
    unsigned char len = 1;
    while (hexNumber >>= 1) len++;
    return len;
}

/**
  * @brief  返回值 = X^Y
  */
unsigned long int Number_Pow(int X, int Y) {
        unsigned long int Result = 1;
        while (Y--) Result *= X;
        return Result;
}

